Readme

# Overview: This script contains codes for regressions in manuscript "Indigenization and the Politics of Inclusion in Chinese Academia"
# Date: 2024-08-01

# System requirements: The developmental version of the package is tested on Windows 11 operating system. The software used  are R version 4.3.2 and R-Studio. System requirements are:
# 1. An Intel-compatible platform running Windows 11, 10 /8.1/8 /7 /Vista /XP /2000 Windows Server 2022, 2019 /2016 /2012 /2008 /2003
# 2. At least 256 MB of RAM, a mouse, and enough disk space for recovered files, image files, etc.
# 3. The administrative privileges are required to install and run R‑Studio utilities.
# 4. A network connection for data recovering over network.

# Installation guide:
# 1. Download R from the CRAN website.
# 2. Download RStudio from the RStudio website (Optional).
# 3. Download the provided R script file to your local machine.
# 4. Set the working directory to the location of the downloaded script file.
# 5. Source and run the script.
# 6. Typical install time on a "normal" desktop computer (including downloading software): 5 minutes

# Instructions for use:
# 1. Ensure you have the required libraries installed.
# 2. Place your data file in the same directory as this script.
# 3. Run the script using R or RStudio.
# 4. The output will be a summary of the regression model.

# Demo: Analyzing Data in Table 1, Model 1 (m1)
# 1. Instructions to run on data: Run the script under "#Code for Table S7 (Table 1)"
# 2. Expected output:
##
## Call:
## lm(formula = `H-Index` ~ `Foreign Education` + `West China`, data = data)
##
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -41.235 -20.934  -3.302  11.015 122.765 
##
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           41.235      2.181  18.910   <2e-16 ***
## `Foreign Education`    9.068      4.955   1.830   0.0686 .  
## `West China`         -20.401     12.108  -1.685   0.0934 .  
## ---
## Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##
## Residual standard error: 29.17 on 225 degrees of freedom
## Multiple R-squared:  0.029,	Adjusted R-squared:  0.02037 
## F-statistic:  3.36 on 2 and 225 DF,  p-value: 0.0365
##
## > log_likelihood <- logLik(m1)
## > print(log_likelihood)
## 'log Lik.' -1091.12 (df=4)
##
# 3. Expected run time for demo on a "normal" desktop computer: 1 minute

# Description of the code's functionality: This script performs ordinary least squares (OLS or LM) regressions and linear mixed-effects regressions (LMER) for Table 1 and Supplementary Tables. See Table legends and Methods section for model details.